package com.bdmc.work.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.bdmc.common.annotation.ExcelDictFormat;
import com.bdmc.common.convert.ExcelDictConvert;
import com.bdmc.common.convert.LocalDateTimeConverter;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

;

/**
 * 清运任务工单视图对象 work_order
 *
 * @author bdmc
 * @date 2022-03-30
 */
@Data
@ExcelIgnoreUnannotated
public class WorkOrderVo {

	private static final long serialVersionUID = 1L;

    /**
     * 
     */
	private Long orderId;

    /**
     * 部门id
     */

	private Long deptId;

    /**
     * 工单号
     */
	@ExcelProperty(value = "工单号",order = 2)
	private String orderNum;

    /**
     * 工单生成时间
     */
	@ExcelProperty(value = "工单生成时间",order = 3,converter = LocalDateTimeConverter.class)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private LocalDateTime orderTime;

    /**
     * 设施id
     */

	private Long facilityId;

	@ExcelProperty(value = "设施名称",order = 1)
	private String facilityName;
    /**
     * 设备id
     */
	private Long deviceId;

    /**
     * 工单状态
     */
	@ExcelProperty(value = "工单状态",order = 4,converter = ExcelDictConvert.class)
	@ExcelDictFormat(dictType = "order_status")
	private Integer orderStatus;

    /**
     * 车辆id
     */
	private Long carId;

    /**
     * 车牌号
     */
	@ExcelProperty(value = "车牌号",order = 5)
	private String carNum;

    /**
     * 司机id
     */
	private Long driverId;

    /**
     * 司机姓名
     */
	@ExcelProperty(value = "司机姓名",order = 6)
	private String driverName;

    /**
     * 司机是否结果
     */
	@ExcelProperty(value = "司机是否结果",order = 7,converter = ExcelDictConvert.class)
	@ExcelDictFormat(dictType = "driver_deal_status")
	private Integer driverDealStatus;

    /**
     * 司机处理时间
     */
	@ExcelProperty(value = "司机处理时间",converter = LocalDateTimeConverter.class,order = 8)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private LocalDateTime driverDealTime;

    /**
     * 主管id
     */
	private Long managerId;

    /**
     * 主管姓名
     */
	@ExcelProperty(value = "主管姓名",order = 9)
	private String managerName;

    /**
     * 保洁id
     */
	private Long cleanerId;

    /**
     * 保洁姓名
     */
	@ExcelProperty(value = "保洁姓名",order = 10)
	private String cleanerName;

    /**
     * 保洁员处理结果
     */
	@ExcelProperty(value = "保洁员处理结果",order = 11,converter = ExcelDictConvert.class)
	@ExcelDictFormat(dictType = "cleaner_deal_status")
	private Integer cleanerDealStatus;

    /**
     * 保洁员处理时间
     */
	@ExcelProperty(value = "保洁员处理时间",converter = LocalDateTimeConverter.class,order = 12)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private LocalDateTime cleanerDealTime;

	/**
	 * 部门名称
	 */
	//@ExcelProperty(value = "部门名称")
	private String deptName;

	private String cleanerDealPic;

	private String cleanerDealContent;

	private String lat;

	private String lng;

	private String address;

	private String cleanerMobile;

	private String driverMobile;

	private String managerMobile;

	/**
	 * 操作人员
	 */
	@ExcelProperty(value = "备注",order = 13)
	private String remark;

	@ExcelProperty(value = "创建人",order = 14)
	private String createNickName;

	@ExcelProperty(value = "创建时间",order = 15,converter = LocalDateTimeConverter.class)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private LocalDateTime createTime;
}
